﻿using Microsoft.Extensions.DependencyInjection;
using Swashbuckle.AspNetCore.SwaggerGen;
using System;

namespace Fast
{
    public static class SwaggerFastApplicationExtensions
    {
        /// <summary>
        /// 添加Swagger文档服务
        /// </summary>
        /// <param name="application"></param>
        /// <param name="swaggerGenConfigure"></param>
        /// <returns></returns>
        public static IFastApplication AddSwaggerDocument(this IFastApplication application, Action<SwaggerGenOptions> swaggerGenConfigure = null)
        {
            application.Services.AddSwaggerDocument(swaggerGenConfigure);

            return application;
        }
    }
}
